package com.ncloud.system.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.ncloud.system.conf.CustomJsonDateDeserializer;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by shiqiang on 2017/7/28.
 */
public class Depart implements Serializable{
    @JSONField(serializeUsing=ToStringSerializer.class)
    private Long departId;
    @JSONField(serializeUsing=ToStringSerializer.class)
    private Long companyId;
    private String companyName;
    private String departName;
    private String useTag;
    @JSONField(serializeUsing=ToStringSerializer.class)
    private Long createUser;
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date createDate;
    @JSONField(serializeUsing=ToStringSerializer.class)
    private Long updateUser;
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date updateDate;
    private String remarks;

    private List<Role> roles = new ArrayList<Role>();

    private int roleCount;
    private Integer accountCount;

    public Long getDepartId() {
        return departId;
    }

    public void setDepartId(Long departId) {
        this.departId = departId;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getDepartName() {
        return departName;
    }

    public void setDepartName(String departName) {
        this.departName = departName;
    }

    public String getUseTag() {
        return useTag;
    }

    public void setUseTag(String useTag) {
        this.useTag = useTag;
    }

    public Long getCreateUser() {
        return createUser;
    }

    public void setCreateUser(Long createUser) {
        this.createUser = createUser;
    }

    public Date getCreateDate() {
        return createDate;
    }
    @JsonDeserialize(using = CustomJsonDateDeserializer.class)
    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Long getUpdateUser() {
        return updateUser;
    }

    public void setUpdateUser(Long updateUser) {
        this.updateUser = updateUser;
    }

    public Date getUpdateDate() {
        return updateDate;
    }
    @JsonDeserialize(using = CustomJsonDateDeserializer.class)
    public void setUpdateDate(Date updateDate) {
        this.updateDate = updateDate;
    }

    public String getRemarks() {
        return remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    public List<Role> getRoles() {
        return roles;
    }

    public void setRoles(List<Role> roles) {
        this.roles = roles;
    }

    public int getRoleCount() {
        return roleCount;
    }

    public void setRoleCount(int roleCount) {
        this.roleCount = roleCount;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public Integer getAccountCount() {
        return accountCount;
    }

    public void setAccountCount(Integer accountCount) {
        this.accountCount = accountCount;
    }
}
